<include file="Common:layout" />
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title"><a class="back" href="javascript:history.back();" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
            <div class="subject">
                <h3>商品管理 - 添加商品</h3>
                <h5>批量上传</h5>
            </div>
        </div>
    </div>

    <div id="explanation" class="explanation">
        <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
            <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
            <span title="收起提示" id="explanationZoom"></span>
        </div>
        <ul>
            <li>上传图片相册前，请先上传商品数据包。</li>
            <li>批量上传功能非常消耗性能，请不要超过 100 张商品图片。</li>
        </ul>
    </div>
    <form action="{:U('Good/good_imgs')}" method="post" class="form-horizontal" id="category_form" enctype="multipart/form-data">
        <div class="ncap-form-default">

            <dl class="row">
                <dt class="tit">
                    <label>选择商品批量上传模板</label>
                </dt>
                <dd class="opt">
                    <div class="input-file-show">
                        <span class="show">
                            <a id="img_a" target="_blank" class="nyroModal" rel="gal" href="">
                                <i id="img_i" class="fa fa-picture-o" onmouseover="layer.tips('<img src=>',this,{tips: [1, '#fff']});" onmouseout="layer.closeAll();"></i>
                            </a>
                        </span>
                        <span class="type-file-box">
                            <input type="text" id="image" name="image" value="" class="type-file-text" disabled>
                            <input type="button" name="button" id="button1" value="选择上传..." class="type-file-button">
                            <input type="file" id="file" name="csv" style="display: none;">
                        </span>
                    </div>
                    <span class="err"></span>
                    <p class="notic">请上传商品图片和相册压缩包（仅支持zip文件类型）</p>
                </dd>
            </dl>
            <div class="bot"><a id="submitBtn" class="ncap-btn-big ncap-btn-green" href="JavaScript:void(0);">确认提交</a></div>
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function() {

        //弹框选择
        $('#button1').click(function() {
            $('#file').click();
        });

        $('#file').change(function() {
            var file = $('#file').val();
            $('#image').val(file);
        });

        //确认excel
        $('#submitBtn').click(function() {
          $('#category_form').submit();
        });

    });
</script>
</body>
</html>